package org.windey.server.servlets;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.windey.server.database.Database;

public class PersistencyListener implements ServletContextListener {
	
	public static Database db;
	

	@Override
	public void contextDestroyed(ServletContextEvent arg0) {
		Database.close();
	}

	@Override
	public void contextInitialized(ServletContextEvent arg0) {
		db = new Database();
	}

}
